#ifndef FITS_IMAGE_H
#define FITS_IMAGE_H

#include "Image.h"

#include <fitsio.h>

#include <string>

using namespace std;

class FITSImage: public Image {

 public:
  FITSImage();
  FITSImage(const string &filename);
  ~FITSImage();
  
  void create(const string &filename, float **pixels, int nRows, int nCols);
  void save(const string &filename, int withHeaders);

 private:

  fitsfile *fp;

  void read(const string &filename);
  void write(const string &filename, float **pixels, int nRows, int nCols);
  void close();
};

#endif /* !FITS_IMAGE_H */
